(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
  ["pages/tejiatushu/add-or-update"], {
    "0d87": function (e, t, n) {
      "use strict";
      (function (e, t) {
        var r = n("4ea4");
        n("f9f2");
        r(n("66fd"));
        var u = r(n("38fc"));
        e.__webpack_require_UNI_MP_PLUGIN__ = n, t(u.default)
      }).call(this, n("bc2e")["default"], n("543d")["createPage"])
    },
    "2e8f": function (e, t, n) {
      "use strict";
      n.r(t);
      var r = n("9cfb"),
        u = n.n(r);
      for (var i in r)["default"].indexOf(i) < 0 && function (e) {
        n.d(t, e, (function () {
          return r[e]
        }))
      }(i);
      t["default"] = u.a
    },
    "38fc": function (e, t, n) {
      "use strict";
      n.r(t);
      var r = n("bce2"),
        u = n("2e8f");
      for (var i in u)["default"].indexOf(i) < 0 && function (e) {
        n.d(t, e, (function () {
          return u[e]
        }))
      }(i);
      n("c5cc");
      var a = n("f0c5"),
        c = Object(a["a"])(u["default"], r["b"], r["c"], !1, null, "29f8dc08", null, !1, r["a"], void 0);
      t["default"] = c.exports
    },
    "926e": function (e, t, n) {},
    "9cfb": function (e, t, n) {
      "use strict";
      (function (e) {
        var r = n("4ea4");
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.default = void 0;
        var u = r(n("2eee")),
          i = r(n("c973")),
          a = {
            data: function () {
              return {
                ruleForm: {
                  tushubianhao: this.getUUID(),
                  tushumingcheng: "",
                  tushuleibie: "",
                  tupian: "",
                  zuozhe: "",
                  chubanshe: "",
                  tushuxiangqing: "",
                  price: "",
                  onelimittimes: "",
                  alllimittimes: ""
                },
                tushuleibieOptions: [],
                tushuleibieIndex: 0,
                user: {},
                ro: {
                  tushubianhao: !1,
                  tushumingcheng: !1,
                  tushuleibie: !1,
                  tupian: !1,
                  zuozhe: !1,
                  chubanshe: !1,
                  tushuxiangqing: !1,
                  clicktime: !1,
                  clicknum: !1,
                  price: !1,
                  onelimittimes: !1,
                  alllimittimes: !1
                }
              }
            },
            components: {
              wPicker: function () {
                Promise.all([n.e("common/vendor"), n.e("components/w-picker/w-picker")]).then(function () {
                  return resolve(n("97f3"))
                }.bind(null, n)).catch(n.oe)
              }
            },
            computed: {},
            onLoad: function (t) {
              var n = this;
              return (0, i.default)(u.default.mark((function r() {
                var i, a, c, o;
                return u.default.wrap((function (r) {
                  while (1) switch (r.prev = r.next) {
                    case 0:
                      return i = e.getStorageSync("nowTable"), r.next = 3, n.$api.session(i);
                    case 3:
                      return a = r.sent, n.user = a.data, r.next = 7, n.$api.option("tushuleibie", "tushuleibie", {});
                    case 7:
                      if (a = r.sent, n.tushuleibieOptions = a.data, n.ruleForm.userid = e.getStorageSync("userid"), t.refid && (n.ruleForm.refid = t.refid, n.ruleForm.nickname = e.getStorageSync("nickname")), !t.id) {
                        r.next = 17;
                        break
                      }
                      return n.ruleForm.id = t.id, r.next = 15, n.$api.info("tejiatushu", n.ruleForm.id);
                    case 15:
                      a = r.sent, n.ruleForm = a.data;
                    case 17:
                      if (!t.cross) {
                        r.next = 72;
                        break
                      }
                      c = e.getStorageSync("crossObj"), r.t0 = u.default.keys(c);
                    case 20:
                      if ((r.t1 = r.t0()).done) {
                        r.next = 72;
                        break
                      }
                      if (o = r.t1.value, "tushubianhao" != o) {
                        r.next = 26;
                        break
                      }
                      return n.ruleForm.tushubianhao = c[o], n.ro.tushubianhao = !0, r.abrupt("continue", 20);
                    case 26:
                      if ("tushumingcheng" != o) {
                        r.next = 30;
                        break
                      }
                      return n.ruleForm.tushumingcheng = c[o], n.ro.tushumingcheng = !0, r.abrupt("continue", 20);
                    case 30:
                      if ("tushuleibie" != o) {
                        r.next = 34;
                        break
                      }
                      return n.ruleForm.tushuleibie = c[o], n.ro.tushuleibie = !0, r.abrupt("continue", 20);
                    case 34:
                      if ("tupian" != o) {
                        r.next = 38;
                        break
                      }
                      return n.ruleForm.tupian = c[o], n.ro.tupian = !0, r.abrupt("continue", 20);
                    case 38:
                      if ("zuozhe" != o) {
                        r.next = 42;
                        break
                      }
                      return n.ruleForm.zuozhe = c[o], n.ro.zuozhe = !0, r.abrupt("continue", 20);
                    case 42:
                      if ("chubanshe" != o) {
                        r.next = 46;
                        break
                      }
                      return n.ruleForm.chubanshe = c[o], n.ro.chubanshe = !0, r.abrupt("continue", 20);
                    case 46:
                      if ("tushuxiangqing" != o) {
                        r.next = 50;
                        break
                      }
                      return n.ruleForm.tushuxiangqing = c[o], n.ro.tushuxiangqing = !0, r.abrupt("continue", 20);
                    case 50:
                      if ("clicktime" != o) {
                        r.next = 54;
                        break
                      }
                      return n.ruleForm.clicktime = c[o], n.ro.clicktime = !0, r.abrupt("continue", 20);
                    case 54:
                      if ("clicknum" != o) {
                        r.next = 58;
                        break
                      }
                      return n.ruleForm.clicknum = c[o], n.ro.clicknum = !0, r.abrupt("continue", 20);
                    case 58:
                      if ("price" != o) {
                        r.next = 62;
                        break
                      }
                      return n.ruleForm.price = c[o], n.ro.price = !0, r.abrupt("continue", 20);
                    case 62:
                      if ("onelimittimes" != o) {
                        r.next = 66;
                        break
                      }
                      return n.ruleForm.onelimittimes = c[o], n.ro.onelimittimes = !0, r.abrupt("continue", 20);
                    case 66:
                      if ("alllimittimes" != o) {
                        r.next = 70;
                        break
                      }
                      return n.ruleForm.alllimittimes = c[o], n.ro.alllimittimes = !0, r.abrupt("continue", 20);
                    case 70:
                      r.next = 20;
                      break;
                    case 72:
                      n.styleChange();
                    case 73:
                    case "end":
                      return r.stop()
                  }
                }), r)
              })))()
            },
            methods: {
              styleChange: function () {
                this.$nextTick((function () {}))
              },
              clicktimeConfirm: function (e) {
                console.log(e), this.ruleForm.clicktime = e.result, this.$forceUpdate()
              },
              tushuleibieChange: function (e) {
                this.tushuleibieIndex = e.target.value, this.ruleForm.tushuleibie = this.tushuleibieOptions[this.tushuleibieIndex]
              },
              tupianTap: function () {
                var e = this;
                this.$api.upload((function (t) {
                  e.ruleForm.tupian = e.$base.url + "upload/" + t.file, e.$forceUpdate(), e.$nextTick((function () {
                    e.styleChange()
                  }))
                }))
              },
              getUUID: function () {
                return (new Date).getTime()
              },
              onSubmitTap: function () {
                var e = this;
                return (0, i.default)(u.default.mark((function t() {
                  return u.default.wrap((function (t) {
                    while (1) switch (t.prev = t.next) {
                      case 0:
                        if (e.ruleForm.tushumingcheng) {
                          t.next = 3;
                          break
                        }
                        return e.$utils.msg("商品名称不能为空"), t.abrupt("return");
                      case 3:
                        if (!e.ruleForm.clicknum || e.$validate.isIntNumer(e.ruleForm.clicknum)) {
                          t.next = 6;
                          break
                        }
                        return e.$utils.msg("点击次数应输入整数"), t.abrupt("return");
                      case 6:
                        if (e.ruleForm.price) {
                          t.next = 9;
                          break
                        }
                        return e.$utils.msg("价格不能为空"), t.abrupt("return");
                      case 9:
                        if (!e.ruleForm.price || e.$validate.isNumber(e.ruleForm.price)) {
                          t.next = 12;
                          break
                        }
                        return e.$utils.msg("价格应输入数字"), t.abrupt("return");
                      case 12:
                        if (!e.ruleForm.onelimittimes || e.$validate.isIntNumer(e.ruleForm.onelimittimes)) {
                          t.next = 15;
                          break
                        }
                        return e.$utils.msg("单限应输入整数"), t.abrupt("return");
                      case 15:
                        if (!e.ruleForm.alllimittimes || e.$validate.isIntNumer(e.ruleForm.alllimittimes)) {
                          t.next = 18;
                          break
                        }
                        return e.$utils.msg("库存应输入整数"), t.abrupt("return");
                      case 18:
                        if (!e.ruleForm.id) {
                          t.next = 23;
                          break
                        }
                        return t.next = 21, e.$api.update("tejiatushu", e.ruleForm);
                      case 21:
                        t.next = 25;
                        break;
                      case 23:
                        return t.next = 25, e.$api.add("tejiatushu", e.ruleForm);
                      case 25:
                        e.$utils.msgBack("提交成功");
                      case 26:
                      case "end":
                        return t.stop()
                    }
                  }), t)
                })))()
              },
              optionsChange: function (e) {
                this.index = e.target.value
              },
              bindDateChange: function (e) {
                this.date = e.target.value
              },
              getDate: function (e) {
                var t = new Date,
                  n = t.getFullYear(),
                  r = t.getMonth() + 1,
                  u = t.getDate();
                return "start" === e ? n -= 60 : "end" === e && (n += 2), r = r > 9 ? r : "0" + r, u = u > 9 ? u : "0" + u, "".concat(n, "-").concat(r, "-").concat(u)
              },
              toggleTab: function (e) {
                this.$refs[e].show()
              }
            }
          };
        t.default = a
      }).call(this, n("543d")["default"])
    },
    bce2: function (e, t, n) {
      "use strict";
      n.d(t, "b", (function () {
        return u
      })), n.d(t, "c", (function () {
        return i
      })), n.d(t, "a", (function () {
        return r
      }));
      var r = {
          wPicker: function () {
            return Promise.all([n.e("common/vendor"), n.e("components/w-picker/w-picker")]).then(n.bind(null, "97f3"))
          }
        },
        u = function () {
          var e = this.$createElement;
          this._self._c
        },
        i = []
    },
    c5cc: function (e, t, n) {
      "use strict";
      var r = n("926e"),
        u = n.n(r);
      u.a
    }
  },
  [
    ["0d87", "common/runtime", "common/vendor"]
  ]
]);